package com.hncgy.xzf.jdapi.domain.product.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品评价表
 * </p>
 *
 * @author 不会代码的蜡笔
 * @since 2025-10-31
 */
@Data
@Schema(name = "ProductReviews对象", description = "商品评价表")
public class ProductReviews implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description ="评价ID，主键")
    @TableId(value = "review_id", type = IdType.AUTO)
    private Integer reviewId;

    @Schema(description ="商品ID，外键")
    private Integer productId;

    @Schema(description ="用户ID，外键")
    private Integer userId;

    @Schema(description ="订单ID，外键")
    private Integer orderId;

    @Schema(description ="评分，1-5分")
    private Byte rating;

    @Schema(description ="评价内容")
    private String reviewText;

    @Schema(description ="评价图片，JSON格式")
    private String reviewImages;

    @Schema(description ="是否匿名：0-否, 1-是")
    private Boolean isAnonymous;

    @Schema(description ="点赞数")
    private Integer likeCount;

    @Schema(description ="状态：pending-待审核, approved-已通过, rejected-已拒绝")
    private String status;

    @Schema(description ="创建时间")
    private LocalDateTime createdAt;

    @Schema(description ="更新时间")
    private LocalDateTime updatedAt;
}
